import Vue from 'vue'
import VueRouter from 'vue-router'
import Main from "@/views/Main"
import Registeration from '@/views/Registration'
import Return from '@/views/Return'
import Farecheck from '@/views/Farecheck'
import Login from '@/views/Login'
import Call from '@/views/Call'
import MedicalRecord from '@/views/MedicalRecord'
import CheckApplication from '@/views/CheckApplication'
import ResultQuery from '@/views/ResultQuery'
import InspectionApplication from '@/views/InspectionApplication'
import PrescriptionApplication from '@/views/PrescriptionApplication'
import Register from '@/views/Register'
import DrugStorageManageView from '@/views/DrugStorageManageView'
import DrugStorageReturnView from '@/views/DrugStorageReturnView'
import DrugStorageDistributeView from '@/views/DrugStorageDistributeView'
import Manage from '@/views/Manage.vue'
import JcjgRecorded from '@/views/ResultRecorded.vue'
import PatientRecorded1 from "@/views/PatientRecorded1.vue";
import Apply from "@/views/Apply.vue";

Vue.use(VueRouter)

const routes = [
  {
    path: '/main',
    name: '首页',
    component: Main,
    children:[
      {
        path: '/registration',
        name: '挂号',
        component: Registeration
      },
      {
        path: '/return',
        name: '退号',
        component: Return
      },
      {
        path: '/farecheck',
        name: '费用查询',
        component: Farecheck
      },
      {
        path: '/call',
        name: '叫号',
        component: Call
      },
      {
        path: '/medicalRecord',
        name: '病历首页',
        component: MedicalRecord
      },
      {
        path: '/checkapplication',
        name: '检查申请',
        component: CheckApplication
      },
      {
        path: '/resultquery',
        name: '结果查询',
        component: ResultQuery
      },
      {
        path: '/inspectionapplication',
        name: '检验申请',
        component: InspectionApplication
      },
      {
        path: '/prescriptionapplication',
        name: '开设处方',
        component: PrescriptionApplication
      },
      {
        path: '/drugstoragemanage',
        name: '药库管理',
        component: DrugStorageManageView
      },
      {
        path: '/drugstoragereturn',
        name: '退药',
        component: DrugStorageReturnView
      },
      {
        path: '/drugstoragedistributeView',
        name: '发药',
        component: DrugStorageDistributeView
      },
      {
        path: '/application',
        name: '检验申请',
        component: () => import('@/views/Application.vue'),
      },
      {
        path: '/recorded',
        name: '患者录入',
        component: () => import('@/views/PatientRecorded.vue'),
      },
      {
        path: '/disposalmanagement',
        name: '处置管理',
        component: () => import('@/views/DisposalManagement.vue'),
      },
      {
        path: '/application1',
        name: '处置申请',
        component: () => import('@/views/Application1.vue'),
      },

      {
        path: '/apply',
        name: '检查申请',
        component: Apply
      },{
        path: '/jcjgRecorded',
        name: '检查结果录入',
        component: JcjgRecorded
      },
      {path: '/PatientRecorded1',
        name: '患者录入',
        component: PatientRecorded1

      },{
        path: '/manage',
        name: '检查管理',
        component: Manage
      }
    ]
  },
  {
    path: '/login',
    name: '登录',
    component: Login
  },
  {
    path:'/register',
    name:'注册',
    component:Register
  }
]

const router = new VueRouter({
  routes
})

export default router
